﻿using System;
using System.Text;
using System.Collections.Generic;

namespace NFinal
{
    /// <summary>
    /// 常量字符串，可以减少内存占用
    /// </summary>
    public struct Constant
    {
        /// <summary>
        /// 默认编码
        /// </summary>
        public static readonly Encoding encoding = new System.Text.UTF8Encoding(false);
        /// <summary>
        /// Headers头 Set-Cookie
        /// </summary>
        public static readonly string HeaderSetCookie="Set-Cookie";
        /// <summary>
        /// Headers头 Content-Type
        /// </summary>
        public static readonly string HeaderContentType = "Content-Type";
        /// <summary>
        /// sessionId的名称
        /// </summary>
        public static readonly string sessionKey = "session_id";
        /// <summary>
        /// session通道的名称
        /// </summary>
        public static readonly string SessionChannel = "Session:";
        /// <summary>
        /// http协议中的分隔符
        /// </summary>
        public static readonly string SchemeDelimiter = "://";
        /// <summary>
        /// 左中括号
        /// </summary>
        public static readonly string openingBracket = "[";
        /// <summary>
        /// 右中括号
        /// </summary>
        public static readonly string closingBracket = "]";
        /// <summary>
        /// null字符串
        /// </summary>
        public static readonly string nullString="null";
        /// <summary>
        /// 逗号
        /// </summary>
        public static readonly string comma = ",";
        /// <summary>
        /// 单引号
        /// </summary>
        public static readonly string CsharpSingleQuote = "\\'";
        /// <summary>
        /// 双引号
        /// </summary>
        public static readonly string CsharpDoubleQuote = "\\\"";
        /// <summary>
        /// 斜杠
        /// </summary>
        public static readonly string CsharpSlash = "\\\\";
        /// <summary>
        /// \0
        /// </summary>
        public static readonly string CsharpSlash0 = "\\0";
        /// <summary>
        /// \a
        /// </summary>
        public static readonly string CsharpSlasha = "\\a";
        /// <summary>
        /// \b
        /// </summary>
        public static readonly string CsharpSlashb = "\\b";
        /// <summary>
        /// \f
        /// </summary>
        public static readonly string CsharpSlashf = "\\f";
        /// <summary>
        /// \n
        /// </summary>
        public static readonly string CsharpSlashn = "\\n";
        /// <summary>
        /// \r
        /// </summary>
        public static readonly string CsharpSlashr = "\\r";
        /// <summary>
        /// \t
        /// </summary>
        public static readonly string CsharpSlasht = "\\t";
        /// <summary>
        /// \v
        /// </summary>
        public static readonly string CsharpSlashv = "\\v";
    }
}